home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue37 / outlook / mapi / mapihook.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-06-19  |  2.1 KB  |  84 lines

  1. {++
  2.  
  3.   m a p i h o o k . p a s
  4.  
  5.   Abstract:
  6.  
  7.     Automatic conversion of mapihook.h.
  8.  
  9.   Comments:
  10.  
  11.     This source file automatically converted by
  12.     htrans 0.91 beta 1 Copyright (c) 1997 Alexander Staubo
  13.  
  14.   Revision history:
  15.  
  16.     18-06-1997 20:53 alex  [Autogenerated]
  17.     18-06-1997 20:53 alex  Retouched for release
  18.  
  19. --}
  20.  
  21. unit MapiHook;
  22.  
  23. {$A+}
  24. {$MINENUMSIZE 4}
  25.  
  26. interface
  27.  
  28. uses
  29.   Windows, SysUtils, ActiveX,
  30.   MapiDefs, MapiX, MapiGuid;
  31.  
  32. (*
  33.  *  M A P I H O O K . H
  34.  *
  35.  *  Defines the SpoolerMsgHook provider interface.
  36.  *
  37.  *  Copyright 1986-1996 Microsoft Corporation. All Rights Reserved.
  38.  *)
  39.  
  40. { ISpoolerHook Interface ------------------------------------------------ }
  41.  
  42. { MsgHooks }
  43.  
  44. const
  45.   HOOK_DELETE = ULONG($00000001);
  46.   HOOK_CANCEL = ULONG($00000002);
  47.  
  48. type
  49.   ISpoolerHook =
  50.     interface(IUnknown)
  51.     [strIID_ISpoolerHook]
  52.       function QueryInterface (riid : PIID; var ppvObj : Pointer) : HResult; stdcall;
  53.       function AddRef : ULONG; stdcall;
  54.       function Release : ULONG; stdcall;
  55.       function InboundMsgHook (lpMessage : IMessage; lpFolder : IMAPIFolder; 
  56.         lpMDB : IMsgStore; var lpulFlags : ULONG; var lpcbEntryID : ULONG; 
  57.         var lppEntryID : PBYTE) : HResult; stdcall;
  58.       function OutboundMsgHook (lpMessage : IMessage; lpFolder : IMAPIFolder; 
  59.         lpMDB : IMsgStore; var lpulFlags : ULONG; var lpcbEntryID : ULONG; 
  60.         var lppEntryID : PBYTE) : HResult; stdcall;
  61.     end;
  62.   
  63.   {!! htrans: [MAPI DECLARE_MAPI_INTERFACE_PTR macro] }
  64.   
  65. { Hook Provider Entry Point }
  66.  
  67. const
  68.   HOOK_INBOUND = ULONG($00000200);
  69.   HOOK_OUTBOUND = ULONG($00000400);
  70.  
  71. {!! Note: Message hook providers export a function called "HPProviderInit"
  72.   following the syntax of this function declaration }
  73.  
  74. type
  75.   THPPROVIDERINIT = function (lpSession : IMAPISession; hInstance : HINST;
  76.     lpAllocateBuffer : PALLOCATEBUFFER; lpAllocateMore : PALLOCATEMORE;
  77.     lpFreeBuffer : PFREEBUFFER; lpSectionUID : PMAPIUID; ulFlags : ULONG;
  78.     out lppSpoolerHook : ISpoolerHook) : HResult; cdecl;
  79.  
  80. implementation
  81.  
  82. end.
  83.  
  84.